package com.luguangtao.service;

import com.luguangtao.entity.Student;
import com.mongodb.client.result.DeleteResult;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;

import java.util.List;
import java.util.Map;

public interface StudentService {
    //新增学生
    String addStu(Map<String,Object>map,String collectionName);
    //根据id修改学生
    String updateStu(Query query, Update update,String collectionName);
    //根据id删除学生
    DeleteResult delStu(Query query,String collectionName);
    //根据学生姓名查询
    List<Student> selectObjectByName(String name);
    //查询年龄大于20的学生
    List<Student> selectObjectByAge(Integer age);
}
